home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 January / enter-2004-01.iso / files / maxima-5.9.0.exe / {app} / info / maxima.info-5 < prev    next >
Encoding:
Text File  |  2003-02-09  |  47.8 KB  |  1,217 lines

  1. This is maxima.info, produced by makeinfo version 4.1 from maxima.texi.
  2.  
  3.    This is a Texinfo Maxima Manual
  4.  
  5.    Copyright 1994,2001 William F. Schelter
  6.  
  7. START-INFO-DIR-ENTRY
  8. * Maxima: (maxima).     A computer algebra system.
  9. END-INFO-DIR-ENTRY
  10.  
  11. 
  12. File: maxima.info,  Node: Definitions for Polynomials,  Prev: Introduction to Polynomials,  Up: Polynomials
  13.  
  14. Definitions for Polynomials
  15. ===========================
  16.  
  17.  - Variable: ALGEBRAIC
  18.      default: [FALSE] must be set to TRUE in order for the
  19.      simplification of algebraic integers to take effect.
  20.  
  21.  - Variable: BERLEFACT
  22.      default: [TRUE] if FALSE then the Kronecker factoring algorithm
  23.      will be used otherwise the Berlekamp algorithm, which is the
  24.      default, will be used.
  25.  
  26.  
  27.  - Function: BEZOUT (p1, p2, var)
  28.      an alternative to the RESULTANT command.  It returns a matrix.
  29.      DETERMINANT of this matrix is the desired resultant.
  30.  
  31.  
  32.  - Function: BOTHCOEF (exp, var)
  33.      returns a list whose first member is the coefficient of var in exp
  34.      (as found by RATCOEF if exp is in CRE form otherwise by COEFF) and
  35.      whose second member is the remaining part of exp.  That is, [A,B]
  36.      where exp=A*var+B.
  37.           (C1) ISLINEAR(EXP,VAR):=BLOCK([C],
  38.                   C:BOTHCOEF(RAT(EXP,VAR),VAR),
  39.                   IS(FREEOF(VAR,C) AND C[1]#0))$
  40.           (C2) ISLINEAR((R**2-(X-R)**2)/X,X);
  41.           (D2)                              TRUE
  42.  
  43.  - Function: COEFF (exp, v, n)
  44.      obtains the coefficient of v**n in exp.  n may be omitted if it is
  45.      1.  v may be an atom, or complete subexpression of exp e.g., X,
  46.      SIN(X), A[I+1], X+Y, etc. (In the last case the expression (X+Y)
  47.      should occur in exp).  Sometimes it may be necessary to expand or
  48.      factor exp in order to make v^n explicit.  This is not done
  49.      automatically by COEFF.
  50.           (C1) COEFF(2*A*TAN(X)+TAN(X)+B=5*TAN(X)+3,TAN(X));
  51.           (D1)                         2 A + 1 = 5
  52.           (C2) COEFF(Y+X*%E**X+1,X,0);
  53.           (D2)                            Y + 1
  54.  
  55.  - Function: COMBINE (exp)
  56.      simplifies the sum exp by combining terms with the same
  57.      denominator into a single term.
  58.  
  59.  
  60.  - Function: CONTENT (p1, var1, ..., varn)
  61.      returns a list whose first element is the greatest common divisor
  62.      of the coefficients of the terms of the polynomial p1 in the
  63.      variable varn (this is the content) and whose second element is
  64.      the polynomial p1 divided by the content.
  65.           (C1) CONTENT(2*X*Y+4*X**2*Y**2,Y);
  66.           (D1)            [2*X, 2*X*Y**2+Y].
  67.  
  68.  - Function: DENOM (exp)
  69.      returns the denominator of the rational expression exp.
  70.  
  71.  
  72.  - Function: DIVIDE (p1, p2, var1, ..., varn)
  73.      computes the quotient and remainder of the polynomial p1 divided
  74.      by the polynomial p2, in a main polynomial variable, varn.  The
  75.      other variables are as in the RATVARS function.  The result is a
  76.      list whose first element is the quotient and whose second element
  77.      is the remainder.
  78.           (C1) DIVIDE(X+Y,X-Y,X);
  79.           (D1)                        [1, 2 Y]
  80.           (C2) DIVIDE(X+Y,X-Y);
  81.           (D2)                      [ - 1, 2 X]
  82.  
  83.      (Note that Y is the main variable in C2)
  84.  
  85.  
  86.  - Function: ELIMINATE ([eq1,eq2,...,eqn],[v1,v2,...,vk])
  87.      eliminates variables from equations (or expressions assumed equal
  88.      to zero) by taking successive resultants. This returns a list of
  89.      n-k expressions with the k variables v1,...,vk eliminated.  First
  90.      v1 is eliminated yielding n-1 expressions, then v2 is, etc.  If
  91.      k=n then a single expression in a list is returned free of the
  92.      variables v1,...,vk.  In this case SOLVE is called to solve the
  93.      last resultant for the last variable.  Example:
  94.           (C1) EXP1:2*X^2+Y*X+Z;
  95.                                               2
  96.           (D1)                   Z + X Y + 2 X
  97.           (C2) EXP2:3*X+5*Y-Z-1;
  98.           (D2)                - Z + 5 Y + 3 X - 1
  99.           (C3) EXP3:Z^2+X-Y^2+5;
  100.                                  2    2
  101.           (D3)                  Z  - Y  + X + 5
  102.           (C4) ELIMINATE([EXP3,EXP2,EXP1],[Y,Z]);
  103.                       8         7         6          5          4
  104.           (D3) [7425 X  - 1170 X  + 1299 X  + 12076 X  + 22887 X
  105.                                          3         2
  106.                                  - 5154 X  - 1291 X  + 7688 X + 15376]
  107.  
  108.  - Function: EZGCD (p1, p2, ...)
  109.      gives a list whose first element is the g.c.d of the polynomials
  110.      p1,p2,...  and whose remaining elements are the polynomials
  111.      divided by the g.c.d.  This always uses the EZGCD algorithm.
  112.  
  113.  
  114.  - Variable: FACEXPAND
  115.      default: [TRUE] controls whether the irreducible factors returned
  116.      by FACTOR are in expanded (the default) or recursive (normal CRE)
  117.      form.
  118.  
  119.  
  120.  - Function: FACTCOMB (exp)
  121.      tries to combine the coefficients of factorials in exp with the
  122.      factorials themselves by converting, for example, (N+1)*N!  into
  123.      (N+1)!.  SUMSPLITFACT[TRUE] if set to FALSE will cause
  124.      MINFACTORIAL to be applied after a FACTCOMB.
  125.           (C1) (N+1)^B*N!^B;
  126.                                                 B   B
  127.           (D1)                           (N + 1)  N!
  128.           (C2) FACTCOMB(%);
  129.  
  130.  - Function: FACTOR (exp)
  131.      factors the expression exp, containing any number of variables or
  132.      functions, into factors irreducible over the integers.
  133.      FACTOR(exp, p) factors exp over the field of integers with an
  134.      element adjoined whose minimum polynomial is p.  FACTORFLAG[FALSE]
  135.      if FALSE suppresses the factoring of integer factors of rational
  136.      expressions.  DONTFACTOR may be set to a list of variables with
  137.      respect to which factoring is not to occur.  (It is initially
  138.      empty).  Factoring also will not take place with respect to any
  139.      variables which are less important (using the variable ordering
  140.      assumed for CRE form) than those on the DONTFACTOR list.
  141.      SAVEFACTORS[FALSE] if TRUE causes the factors of an expression
  142.      which is a product of factors to be saved by certain functions in
  143.      order to speed up later factorizations of expressions containing
  144.      some of the same factors.  BERLEFACT[TRUE] if FALSE then the
  145.      Kronecker factoring algorithm will be used otherwise the Berlekamp
  146.      algorithm, which is the default, will be used.  INTFACLIM[1000] is
  147.      the largest divisor which will be tried when factoring a bignum
  148.      integer.  If set to FALSE (this is the case when the user calls
  149.      FACTOR explicitly), or if the integer is a fixnum (i.e.  fits in
  150.      one machine word), complete factorization of the integer will be
  151.      attempted.  The user's setting of INTFACLIM is used for internal
  152.      calls to FACTOR. Thus, INTFACLIM may be reset to prevent MACSYMA
  153.      from taking an inordinately long time factoring large integers.
  154.      NEWFAC[FALSE] may be set to true to use the new factoring routines.
  155.      Do EXAMPLE(FACTOR); for examples.
  156.  
  157.  
  158.  - Variable: FACTORFLAG
  159.      default: [FALSE] if FALSE suppresses the factoring of integer
  160.      factors of rational expressions.
  161.  
  162.  
  163.  - Function: FACTOROUT (exp,var1,var2,...)
  164.      rearranges the sum exp into a sum of terms of the form
  165.      f(var1,var2,...)*g where g is a product of expressions not
  166.      containing the vari's and f is factored.
  167.  
  168.  
  169.  - Function: FACTORSUM (exp)
  170.      tries to group terms in factors of exp which are sums into groups
  171.      of terms such that their sum is factorable.  It can recover the
  172.      result of EXPAND((X+Y)^2+(Z+W)^2) but it can't recover
  173.      EXPAND((X+1)^2+(X+Y)^2) because the terms have variables in common.
  174.           (C1) (X+1)*((U+V)^2+A*(W+Z)^2),EXPAND;
  175.                 2      2                            2      2
  176.           (D1) A X Z  + A Z  + 2 A W X Z + 2 A W Z + A W  X + V  X
  177.                                2        2    2            2
  178.                   + 2 U V X + U  X + A W  + V  + 2 U V + U
  179.           (C2) FACTORSUM(%);
  180.                                              2          2
  181.           (D2)                 (X + 1) (A (Z + W)  + (V + U) )
  182.  
  183.  - Function: FASTTIMES (p1, p2)
  184.      multiplies the polynomials p1 and p2 by using a special algorithm
  185.      for multiplication of polynomials.  They should be multivariate,
  186.      dense, and nearly the same size.  Classical multiplication is of
  187.      order N*M where N and M are the degrees.  FASTTIMES is of order
  188.      MAX(N,M)**1.585.
  189.  
  190.  
  191.  - Function: FULLRATSIMP (exp)
  192.      When non-rational expressions are involved, one call to RATSIMP
  193.      followed as is usual by non-rational ("general") simplification
  194.      may not be sufficient to return a simplified result.  Sometimes,
  195.      more than one such call may be necessary.  The command FULLRATSIMP
  196.      makes this process convenient.  FULLRATSIMP repeatedly applies
  197.      RATSIMP followed by non-rational simplification to an expression
  198.      until no further change occurs.  For example, consider For the
  199.      expression  EXP:   (X^(A/2)+1)^2*(X^(A/2)-1)^2/(X^A-1) .
  200.      RATSIMP(EXP); gives (X^(2*A)-2*X^A+1)/(X^A-1) .  FULLRATSIMP(EXP);
  201.      gives   X^A-1 .  The problem may be seen by looking at RAT(EXP);
  202.      which gives  ((X^(A/2))^4-2*(X^(A/2))^2+1)/(X^A-1) .
  203.      FULLRATSIMP(exp,var1,...,varn) takes one or more arguments similar
  204.      to RATSIMP and RAT.
  205.  
  206.  
  207.  - Function: FULLRATSUBST (a,b,c)
  208.      is the same as RATSUBST except that it calls itself recursively on
  209.      its result until that result stops changing.  This function is
  210.      useful when the replacement expression and the replaced expression
  211.      have one or more variables in common.  FULLRATSUBST will also
  212.      accept its arguments in the format of LRATSUBST.  That is, the
  213.      first argument may be a single substitution equation or a list of
  214.      such equations, while the second argument is the expression being
  215.      processed.  There is a demo available by DEMO("lrats.dem"); .
  216.  
  217.  
  218.  - Function: GCD (p1, p2, var1, ...)
  219.      computes the greatest common divisor of p1 and p2.  The flag
  220.      GCD[SPMOD] determines which algorithm is employed.  Setting GCD to
  221.      EZ, EEZ, SUBRES, RED, or SPMOD selects the EZGCD, New EEZ GCD,
  222.      subresultant PRS, reduced, or modular algorithm, respectively.  If
  223.      GCD:FALSE then GCD(p1,p2,var) will always return 1 for all var.
  224.      Many functions (e.g.  RATSIMP, FACTOR, etc.) cause gcd's to be
  225.      taken implicitly.  For homogeneous polynomials it is recommended
  226.      that GCD:SUBRES be used.  To take the gcd when an algebraic is
  227.      present, e.g. GCD(X^2-2*SQRT(2)*X+2,X-SQRT(2)); , ALGEBRAIC must be
  228.      TRUE and GCD must not be EZ.  SUBRES is a new algorithm, and people
  229.      who have been using the RED setting should probably change it to
  230.      SUBRES.  The GCD flag, default: [SPMOD], if FALSE will also
  231.      prevent the greatest common divisor from being taken when
  232.      expressions are converted to CRE form.  This will sometimes speed
  233.      the calculation if gcds are not required.
  234.  
  235.  
  236.  - Function: GCDEX (f,g)
  237.  - Function: GCDEX (f,g,var)
  238.      returns a list containing [a,b,u] where u is the gcd of f and g,
  239.      and u = a*f + b*g.   The arguments f and g should b univariate
  240.      polynomials, or else polynomials in VAR a supplied main variable
  241.      since we need to be in a principal ideal domain for this to work.
  242.      The gcd means the gcd regarding f and g as univariate polynomials
  243.      with coefficients being rational functions in the other variables.
  244.  
  245.      The algorithm is simply the euclidean algorithm, where we have a
  246.      sequence of `lis[i]:[a[i],b[i],r[i]] ..' which are all
  247.      perpendicular to `[f,g,-1]' and the next one is built as if `q =
  248.      quotient(r[i]/r[i+1])' then `lis[i+2]:lis[i]-q*lis[i+1]', and it
  249.      terminates at `lis[i+1]' when the remainder `r[i+2]' is zero.
  250.           (C1) gcdex(x^2+1,x^3+4);
  251.           
  252.                                         2
  253.                                        x  + 4 x - 1  x + 4
  254.           (D1)/R/                   [- ------------, -----, 1]
  255.                                             17        17
  256.           
  257.           (C2) d1.[x^2+1,x^3+4,-1];
  258.           (D2)                                   0
  259.  
  260.      note that the gcd in the following is `1' since we work in
  261.      `k(y)[x]', not the  `y+1' we would expect in `k[y,x] '
  262.  
  263.           (C4) gcdex(x*(y+1),y^2-1,x);
  264.           
  265.                                                 1
  266.           (D4)                            [0, ------, 1]
  267.                                                2
  268.                                               y  - 1
  269.  
  270.  
  271.  - Function: GCFACTOR (n)
  272.      factors the gaussian integer n over the gaussians, i.e.  numbers
  273.      of the form a + b i where a and b are rational integers (i.e.
  274.      ordinary integers).  Factors are normalized by making a and b
  275.      non-negative.
  276.  
  277.  
  278.  - Function: GFACTOR (exp)
  279.      factors the polynomial exp over the Gaussian integers (i.  e.
  280.      with SQRT(-1) = %I adjoined).  This is like FACTOR(exp,A**2+1)
  281.      where A is %I.
  282.           (C1)  GFACTOR(X**4-1);
  283.           (D1)        (X - 1) (X + 1) (X + %I) (X - %I)
  284.  
  285.  - Function: GFACTORSUM (exp)
  286.      is similar to FACTORSUM but applies GFACTOR instead of FACTOR.
  287.  
  288.  
  289.  - Function: HIPOW (exp, v)
  290.      the highest explicit exponent of v in exp.  Sometimes it may be
  291.      necessary to expand exp since this is not done automatically by
  292.      HIPOW.  Thus HIPOW(Y**3*X**2+X*Y**4,X) is 2.
  293.  
  294.  
  295.  - Variable: INTFACLIM
  296.      default: [1000] is the largest divisor which will be tried when
  297.      factoring a bignum integer.  If set to FALSE (this is the case
  298.      when the user calls FACTOR explicitly), or if the integer is a
  299.      fixnum (i.e. fits in one machine word), complete factorization of
  300.      the integer will be attempted.  The user's setting of INTFACLIM is
  301.      used for internal calls to FACTOR. Thus, INTFACLIM may be reset to
  302.      prevent MACSYMA from taking an inordinately long time factoring
  303.      large integers.
  304.  
  305.  
  306.  - Variable: KEEPFLOAT
  307.      default: [FALSE] - if set to TRUE will prevent floating point
  308.      numbers from being rationalized when expressions which contain
  309.      them are converted to CRE form.
  310.  
  311.  
  312.  - Function: LRATSUBST (list,exp)
  313.      is analogous to SUBST(list_of_equations,exp) except that it uses
  314.      RATSUBST instead of SUBST.  The first argument of LRATSUBST must
  315.      be an equation or a list of equations identical in format to that
  316.      accepted by SUBST (see DESCRIBE(SUBST);).  The substitutions are
  317.      made in the order given by the list of equations, that is, from
  318.      left to right.  A demo is available by doing DEMO("lrats.dem"); .
  319.  
  320.  
  321.  - Variable: MODULUS
  322.      default: [FALSE] - if set to a positive prime p, then all
  323.      arithmetic in the rational function routines will be done modulo p.
  324.      That is all integers will be reduced to less than p/2 in absolute
  325.      value (if p=2 then all integers are reduced to 1 or 0).  This is
  326.      the so called "balanced" modulus system, e.g. N MOD 5 = -2, -1, 0,
  327.      1, or 2.  Warning: If EXP is already in CRE form when you reset
  328.      MODULUS, then you may need to re-rat EXP, e.g.
  329.      EXP:RAT(RATDISREP(EXP)), in order to get correct results. (If
  330.      MODULUS is set to a positive non-prime integer, this setting will
  331.      be accepted, but a warning will be given.)
  332.  
  333.  
  334.  - Variable: NEWFAC
  335.      default: [FALSE], if TRUE then FACTOR will use the new factoring
  336.      routines.
  337.  
  338.  
  339.  - Function: NUM (exp)
  340.      obtains the numerator, exp1, of the rational expression exp =
  341.      exp1/exp2.
  342.  
  343.  
  344.  - Function: QUOTIENT (p1, p2, var1, ...)
  345.      computes the quotient of the polynomial p1 divided by the
  346.      polynomial p2.
  347.  
  348.  
  349.  - Function: RAT (exp, v1, ..., vn)
  350.      converts exp to CRE form by expanding and combining all terms over
  351.      a common denominator and cancelling out the greatest common
  352.      divisor of the numerator and denominator as well as converting
  353.      floating point numbers to rational numbers within a tolerance of
  354.      RATEPSILON[2.0E-8].  The variables are ordered according to the
  355.      v1,...,vn as in RATVARS, if these are specified.  RAT does not
  356.      generally simplify functions other than + , - , * , / , and
  357.      exponentiation to an integer power whereas RATSIMP does handle
  358.      these cases.  Note that atoms (numbers and names) in CRE form are
  359.      not the same as they are in the general form.  Thus RAT(X)- X
  360.      results in RAT(0) which has a different internal representation
  361.      than 0.  RATFAC[FALSE] when TRUE invokes a partially factored form
  362.      for CRE rational expressions.  During rational operations the
  363.      expression is maintained as fully factored as possible without an
  364.      actual call to the factor package.  This should always save space
  365.      and may save some time in some computations.  The numerator and
  366.      denominator are still made relatively prime (e.g.  RAT((X^2
  367.      -1)^4/(X+1)^2); yields (X-1)^4*(X+1)^2), but the factors within
  368.      each part may not be relatively prime.  RATPRINT[TRUE] if FALSE
  369.      suppresses the printout of the message informing the user of the
  370.      conversion of floating point numbers to rational numbers.
  371.      KEEPFLOAT[FALSE] if TRUE prevents floating point numbers from being
  372.      converted to rational numbers.  (Also see the RATEXPAND and
  373.      RATSIMP functions.)
  374.           (C1) ((X-2*Y)**4/(X**2-4*Y**2)**2+1)*(Y+A)*(2*Y+X)
  375.                   /(4*Y**2+X**2);
  376.                                                      4
  377.                                             (X - 2 Y)
  378.                         (Y + A) (2 Y + X) (------------ + 1)
  379.                                              2      2 2
  380.                                            (X  - 4 Y )
  381.           (D1)          ------------------------------------
  382.                                         2    2
  383.                                      4 Y  + X
  384.           (C2) RAT(%,Y,A,X);
  385.                                       2 A + 2 Y
  386.           (D2)/R/                     ---------
  387.                                        X + 2 Y
  388.  
  389.  - Variable: RATALGDENOM
  390.      default: [TRUE] - if TRUE allows rationalization of denominators
  391.      wrt.  radicals to take effect.  To do this one must use CRE form
  392.      in algebraic mode.
  393.  
  394.  
  395.  - Function: RATCOEF (exp, v, n)
  396.      returns the coefficient, C, of the expression v**n in the
  397.      expression exp.  n may be omitted if it is 1.  C will be free
  398.      (except possibly in a non-rational sense) of the variables in v.
  399.      If no coefficient of this type exists, zero will be returned.
  400.      RATCOEF expands and rationally simplifies its first argument and
  401.      thus it may produce answers different from those of COEFF which is
  402.      purely syntactic.  Thus RATCOEF((X+1)/Y+X,X) returns (Y+1)/Y
  403.      whereas COEFF returns 1.  RATCOEF(exp,v,0), viewing exp as a sum,
  404.      gives a sum of those terms which do not contain v.  Therefore if v
  405.      occurs to any negative powers, RATCOEF should not be used.  Since
  406.      exp is rationally simplified before it is examined, coefficients
  407.      may not appear quite the way they were envisioned.
  408.           (C1) S:A*X+B*X+5$
  409.           (C2) RATCOEF(S,A+B);
  410.           (D2)               X
  411.  
  412.  - Function: RATDENOM (exp)
  413.      obtains the denominator of the rational expression exp.  If exp is
  414.      in general form then the DENOM function should be used instead,
  415.      unless one wishes to get a CRE result.
  416.  
  417.  
  418.  - Variable: RATDENOMDIVIDE
  419.      default: [TRUE] - if FALSE will stop the splitting up of the terms
  420.      of the numerator of RATEXPANDed expressions from occurring.
  421.  
  422.  
  423.  - Function: RATDIFF (exp, var)
  424.      differentiates the rational expression exp (which must be a ratio
  425.      of polynomials or a polynomial in the variable var) with respect
  426.      to var.  For rational expressions this is much faster than DIFF.
  427.      The result is left in CRE form.  However, RATDIFF should not be
  428.      used on factored CRE forms; use DIFF instead for such expressions.
  429.           (C1) (4*X**3+10*X-11)/(X**5+5);
  430.                                                    3
  431.                                                 4 X  + 10 X - 11
  432.           (D1)                                  ----------------
  433.                                                       5
  434.                                                      X
  435.           (C2) MODULUS:3$
  436.           (C3) MOD(D1);
  437.                                           2
  438.                                          X  + X - 1
  439.           (D3)                      --------------------
  440.                                      4    3    2
  441.                                     X  + X  + X  + X + 1
  442.           (C4) RATDIFF(D1,X);
  443.                                     5    4    3
  444.                                    X  - X  - X  + X - 1
  445.           (D4)                ------------------------------
  446.                                8    7    5    4    3
  447.                               X  - X  + X  - X  + X  - X + 1
  448.  
  449.  - Function: RATDISREP (exp)
  450.      changes its argument from CRE form to general form.  This is
  451.      sometimes convenient if one wishes to stop the "contagion", or use
  452.      rational functions in non-rational contexts.  Most CRE functions
  453.      will work on either CRE or non-CRE expressions, but the answers may
  454.      take different forms.  If RATDISREP is given a non-CRE for an
  455.      argument, it returns its argument unchanged.  See also TOTALDISREP.
  456.  
  457.  
  458.  - Variable: RATEPSILON
  459.      default: [2.0E-8] - the tolerance used in the conversion of
  460.      floating point numbers to rational numbers.
  461.  
  462.  
  463.  - Function: RATEXPAND (exp)
  464.      expands exp by multiplying out products of sums and exponentiated
  465.      sums, combining fractions over a common denominator, cancelling
  466.      the greatest common divisor of the numerator and denominator, then
  467.      splitting the numerator (if a sum) into its respective terms
  468.      divided by the denominator.  This is accomplished by converting
  469.      exp to CRE form and then back to general form.  The switch
  470.      RATEXPAND, default: [FALSE], if TRUE will cause CRE expressions to
  471.      be fully expanded when they are converted back to general form or
  472.      displayed, while if it is FALSE then they will be put into a
  473.      recursive form. (see RATSIMP) RATDENOMDIVIDE[TRUE] - if FALSE will
  474.      stop the splitting up of the terms of the numerator of RATEXPANDed
  475.      expressions from occurring.  KEEPFLOAT[FALSE] if set to TRUE will
  476.      prevent floating point numbers from being rationalized when
  477.      expressions which contain them are converted to CRE form.
  478.           (C1) RATEXPAND((2*X-3*Y)**3);
  479.                           3         2       2        3
  480.           (D1)      - 27 Y  + 54 X Y  - 36 X  Y + 8 X
  481.           (C2) (X-1)/(X+1)**2+1/(X-1);
  482.                                         X - 1       1
  483.           (D2)                         -------- + -----
  484.                                               2   X - 1
  485.                                        (X + 1)
  486.           (C3) EXPAND(D2);
  487.                                    X              1           1
  488.           (D3)                ------------ - ------------ + -----
  489.                                2              2             X - 1
  490.                               X  + 2 X + 1   X  + 2 X + 1
  491.           (C4) RATEXPAND(D2);
  492.                                        2
  493.                                     2 X                 2
  494.           (D4)                 --------------- + ---------------
  495.                                 3    2            3    2
  496.                                X  + X  - X - 1   X  + X  - X - 1
  497.  
  498.  - Variable: RATFAC
  499.      default: [FALSE] - when TRUE invokes a partially factored form for
  500.      CRE rational expressions.  During rational operations the
  501.      expression is maintained as fully factored as possible without an
  502.      actual call to the factor package.  This should always save space
  503.      and may save some time in some computations.  The numerator and
  504.      denominator are still made relatively prime, for example RAT((X^2
  505.      -1)^4/(X+1)^2);  yields (X-1)^4*(X+1)^2), but the factors within
  506.      each part may not be relatively prime.  In the CTENSR (Component
  507.      Tensor Manipulation) Package, if RATFAC is TRUE, it causes the
  508.      Ricci, Einstein, Riemann, and Weyl tensors and the Scalar
  509.      Curvature to be factored automatically.  ** This should only be
  510.      set for cases where the tensorial components are known to consist
  511.      of few terms **.  Note: The RATFAC and RATWEIGHT schemes are
  512.      incompatible and may not both be used at the same time.
  513.  
  514.  
  515.  - Function: RATNUMER (exp)
  516.      obtains the numerator of the rational expression exp.  If exp is
  517.      in general form then the NUM function should be used instead,
  518.      unless one wishes to get a CRE result.
  519.  
  520.  
  521.  - Function: RATNUMP (exp)
  522.      is TRUE if exp is a rational number (includes integers) else FALSE.
  523.  
  524.  
  525.  - Function: RATP (exp)
  526.      is TRUE if exp is in CRE or extended CRE form else FALSE.
  527.  
  528.  
  529.  - Variable: RATPRINT
  530.      default: [TRUE] - if FALSE suppresses the printout of the message
  531.      informing the user of the conversion of floating point numbers to
  532.      rational numbers.
  533.  
  534.  
  535.  - Function: RATSIMP (exp)
  536.      rationally" simplifies (similar to RATEXPAND) the expression exp
  537.      and all of its subexpressions including the arguments to non-
  538.      rational functions.  The result is returned as the quotient of two
  539.      polynomials in a recursive form, i.e.  the coefficients of the
  540.      main variable are polynomials in the other variables.  Variables
  541.      may, as in RATEXPAND, include non-rational functions (e.g.
  542.      SIN(X**2+1) ) but with RATSIMP, the arguments to non-rational
  543.      functions are rationally simplified.  Note that RATSIMP is
  544.      affected by some of the variables which affect RATEXPAND.
  545.      RATSIMP(exp,v1,v2,...,vn) - enables rational simplification with
  546.      the specification of variable ordering as in RATVARS.
  547.      RATSIMPEXPONS[FALSE] - if TRUE will cause exponents of expressions
  548.      to be RATSIMPed automatically during simplification.
  549.           (C1) SIN(X/(X^2+X))=%E^((LOG(X)+1)**2-LOG(X)**2);
  550.                                                      2          2
  551.                               X          (LOG(X) + 1)  - LOG (X)
  552.           (D1)          SIN(------) = %E
  553.                              2
  554.                             X  + X
  555.           (C2) RATSIMP(%);
  556.                                             1          2
  557.           (D2)                        SIN(-----) = %E X
  558.                                           X + 1
  559.           (C3) ((X-1)**(3/2)-(X+1)*SQRT(X-1))/SQRT((X-1)*(X+1));
  560.                                  3/2
  561.                           (X - 1)    - SQRT(X - 1) (X + 1)
  562.           (D3)            --------------------------------
  563.                               SQRT(X - 1) SQRT(X + 1)
  564.           (C4) RATSIMP(%);
  565.                                            2
  566.           (D4)                      - -----------
  567.                                       SQRT(X + 1)
  568.           (C5)  X**(A+1/A),RATSIMPEXPONS:TRUE;
  569.                               2
  570.                              A  + 1
  571.                              ------
  572.                                A
  573.           (D5)              X
  574.  
  575.  - Variable: RATSIMPEXPONS
  576.      default: [FALSE] - if TRUE will cause exponents of expressions to
  577.      be RATSIMPed automatically during simplification.
  578.  
  579.  
  580.  - Function: RATSUBST (a, b, c)
  581.      substitutes a for b in c.  b may be a sum, product, power, etc.
  582.      RATSUBST knows something of the meaning of expressions whereas
  583.      SUBST does a purely syntactic substitution.  Thus
  584.      SUBST(A,X+Y,X+Y+Z) returns X+Y+Z whereas RATSUBST would return Z+A.
  585.      RADSUBSTFLAG[FALSE] if TRUE permits RATSUBST to make substitutions
  586.      like U for SQRT(X) in X.  Do EXAMPLE(RATSUBST); for examples.
  587.  
  588.  
  589.  - Function: RATVARS (var1, var2, ..., varn)
  590.      forms its n arguments into a list in which the rightmost variable
  591.      varn will be the main variable of future rational expressions in
  592.      which it occurs, and the other variables will follow in sequence.
  593.      If a variable is missing from the RATVARS list, it will be given
  594.      lower priority than the leftmost variable var1. The arguments to
  595.      RATVARS can be either variables or non-rational functions (e.g.
  596.      SIN(X)).  The variable RATVARS is a list of the arguments which
  597.      have been given to this function.
  598.  
  599.  
  600.  - Function: RATWEIGHT (v1, w1, ..., vn, wn)
  601.      assigns a weight of wi to the variable vi.  This causes a term to
  602.      be replaced by 0 if its weight exceeds the value of the variable
  603.      RATWTLVL [default is FALSE which means no truncation].  The weight
  604.      of a term is the sum of the products of the weight of a variable
  605.      in the term times its power.  Thus the weight of 3*v1**2*v2 is
  606.      2*w1+w2.  This truncation occurs only when multiplying or
  607.      exponentiating CRE forms of expressions.
  608.           (C5) RATWEIGHT(A,1,B,1);
  609.           (D5)                         [[B, 1], [A, 1]]
  610.           (C6) EXP1:RAT(A+B+1)$
  611.           (C7) %**2;
  612.                                 2                  2
  613.           (D7)/R/              B  + (2 A + 2) B + A  + 2 A + 1
  614.           (C8) RATWTLVL:1$
  615.           (C9) EXP1**2;
  616.           (D9)/R/                       2 B + 2 A + 1
  617.      Note: The RATFAC and RATWEIGHT schemes are incompatible and may not
  618.      both be used at the same time.
  619.  
  620.  
  621.  - Variable: RATWEIGHTS
  622.      - a list of weight assignments (set up by the RATWEIGHT function),
  623.      RATWEIGHTS; or RATWEIGHT(); will show you the list.
  624.  
  625.           KILL(...,RATWEIGHTS)
  626.      and
  627.           SAVE(...,RATWEIGHTS);
  628.      both work.
  629.  
  630.  
  631.  - Variable: RATWEYL
  632.      default: [] - one of the switches controlling the simplification
  633.      of components of the Weyl conformal tensor; if TRUE, then the
  634.      components will be rationally simplified; if FACRAT is TRUE then
  635.      the results will be factored as well.
  636.  
  637.  
  638.  - Variable: RATWTLVL
  639.      default: [FALSE] - used in combination with the RATWEIGHT function
  640.      to control the truncation of rational (CRE form) expressions (for
  641.      the default value of FALSE, no truncation occurs).
  642.  
  643.  
  644.  - Function: REMAINDER (p1, p2, var1, ...)
  645.      computes the remainder of the polynomial p1 divided by the
  646.      polynomial p2.
  647.  
  648.  
  649.  - Function: RESULTANT (p1, p2, var)
  650.      computes the resultant of the two polynomials p1 and p2,
  651.      eliminating the variable var.  The resultant is a determinant of
  652.      the coefficients of var in p1 and p2 which equals zero if and only
  653.      if p1 and p2 have a non-constant factor in common.  If p1 or p2
  654.      can be factored, it may be desirable to call FACTOR before calling
  655.      RESULTANT.  RESULTANT[SUBRES] - controls which algorithm will be
  656.      used to compute the resultant.  SUBRES for subresultant prs [the
  657.      default], MOD for modular resultant algorithm, and RED for reduced
  658.      prs.  On most problems SUBRES should be best.  On some large
  659.      degree univariate or bivariate problems MOD may be better.
  660.      Another alternative is the BEZOUT command which takes the same
  661.      arguments as RESULTANT and returns a matrix.  DETERMINANT of this
  662.      matrix is the desired resultant.
  663.  
  664.  
  665.  - Variable: SAVEFACTORS
  666.      default: [FALSE] - if TRUE causes the factors of an expression
  667.      which is a product of factors to be saved by certain functions in
  668.      order to speed up later factorizations of expressions containing
  669.      some of the same factors.
  670.  
  671.  
  672.  - Function: SQFR (exp)
  673.      is similar to FACTOR except that the polynomial factors are
  674.      "square-free." That is, they have factors only of degree one.  This
  675.      algorithm, which is also used by the first stage of FACTOR,
  676.      utilizes the fact that a polynomial has in common with its nth
  677.      derivative all its factors of degree > n.  Thus by taking gcds
  678.      with the polynomial of the derivatives with respect to each
  679.      variable in the polynomial, all factors of degree > 1 can be found.
  680.           (C1) SQFR(4*X**4+4*X**3-3*X**2-4*X-1);
  681.                                        2               2
  682.           (D1)                       (X  - 1) (2 X + 1)
  683.  
  684.  - Function: TELLRAT (poly)
  685.      adds to the ring of algebraic integers known to MACSYMA, the
  686.      element which is the solution of the polynomial with integer
  687.      coefficients.  MACSYMA initially knows about %I and all roots of
  688.      integers. TELLRAT(X); means substitute 0 for X in rational
  689.      functions.  There is a command UNTELLRAT which takes kernels and
  690.      removes TELLRAT properties.  When TELLRATing a multivariate
  691.      polynomial, e.g. TELLRAT(X^2-Y^2);, there would be an ambiguity as
  692.      to whether to substitute Y^2 for X^2 or vice versa.  The system
  693.      will pick a particular ordering, but if the user wants to specify
  694.      which, e.g.  TELLRAT(Y^2=X^2); provides a syntax which says
  695.      replace Y^2 by X^2.  TELLRAT and UNTELLRAT both can take any
  696.      number of arguments, and TELLRAT(); returns a list of the current
  697.      substitutions.  Note: When you TELLRAT reducible polynomials, you
  698.      want to be careful not to attempt to rationalize a denominator
  699.      with a zero divisor.  E.g.  TELLRAT(W^3-1)$ ALGEBRAIC:TRUE$
  700.      RAT(1/(W^2-W)); will give "quotient by zero".  This error can be
  701.      avoided by setting RATALGDENOM:FALSE$.  ALGEBRAIC[FALSE] must be
  702.      set to TRUE in order for the simplification of algebraic integers
  703.      to take effect.  Do EXAMPLE(TELLRAT); for examples.
  704.  
  705.  
  706.  - Function: TOTALDISREP (exp)
  707.      converts every subexpression of exp from CRE to general form.  If
  708.      exp is itself in CRE form then this is identical to RATDISREP but
  709.      if not then RATDISREP would return exp unchanged while TOTALDISREP
  710.      would "totally disrep" it.  This is useful for ratdisrepping
  711.      expressions e.g., equations, lists, matrices, etc. which have some
  712.      subexpressions in CRE form.
  713.  
  714.  
  715.  - Function: UNTELLRAT (x)
  716.      takes kernels and removes TELLRAT properties.
  717.  
  718.  
  719. 
  720. File: maxima.info,  Node: Constants,  Next: Logarithms,  Prev: Polynomials,  Up: Top
  721.  
  722. Constants
  723. *********
  724.  
  725. * Menu:
  726.  
  727. * Definitions for Constants::
  728.  
  729. 
  730. File: maxima.info,  Node: Definitions for Constants,  Prev: Constants,  Up: Constants
  731.  
  732. Definitions for Constants
  733. =========================
  734.  
  735.  - Variable: E
  736.      - The base of natural logarithms, e, is represented in MACSYMA as
  737.      %E.
  738.  
  739.  
  740.  - Variable: FALSE
  741.      - the Boolean constant, false. (NIL in LISP)
  742.  
  743.  
  744.  - Variable: MINF
  745.      - real minus infinity.
  746.  
  747.  
  748.  - Variable: PI
  749.      - "pi" is represented in MACSYMA as %PI.
  750.  
  751.  
  752.  - Variable: TRUE
  753.      - the Boolean constant, true. (T in LISP)
  754.  
  755.  
  756. 
  757. File: maxima.info,  Node: Logarithms,  Next: Trigonometric,  Prev: Constants,  Up: Top
  758.  
  759. Logarithms
  760. **********
  761.  
  762. * Menu:
  763.  
  764. * Definitions for Logarithms::
  765.  
  766. 
  767. File: maxima.info,  Node: Definitions for Logarithms,  Prev: Logarithms,  Up: Logarithms
  768.  
  769. Definitions for Logarithms
  770. ==========================
  771.  
  772.  - Function: LOG (X)
  773.      the natural logarithm.
  774.  
  775.      LOGEXPAND[TRUE] - causes LOG(A^B) to become B*LOG(A).  If it is set
  776.      to ALL, LOG(A*B) will also simplify to LOG(A)+LOG(B).  If it is
  777.      set to SUPER, then LOG(A/B) will also simplify to LOG(A)-LOG(B)
  778.      for rational numbers a/b, a#1.  (LOG(1/B), for B integer, always
  779.      simplifies.)  If it is set to FALSE, all of these simplifications
  780.      will be turned off.
  781.  
  782.      LOGSIMP[TRUE] - if FALSE then no simplification of %E to a power
  783.      containing LOG's is done.
  784.  
  785.      LOGNUMER[FALSE] - if TRUE then negative floating point arguments to
  786.      LOG will always be converted to their absolute value before the
  787.      log is taken.  If NUMER is also TRUE, then negative integer
  788.      arguments to LOG will also be converted to their absolute value.
  789.  
  790.      LOGNEGINT[FALSE] - if TRUE implements the rule LOG(-n) ->
  791.      LOG(n)+%i*%pi for n a positive integer.
  792.  
  793.      %E_TO_NUMLOG[FALSE] - when TRUE, "r" some rational number, and "x"
  794.      some expression, %E^(r*LOG(x)) will be simplified into x^r .  It
  795.      should be noted that the RADCAN command also does this
  796.      transformation, and more complicated transformations of this ilk
  797.      as well.  The LOGCONTRACT command "contracts" expressions
  798.      containing LOG.
  799.  
  800.  
  801.  - Variable: LOGABS
  802.      default: [FALSE] - when doing indefinite integration where logs
  803.      are generated, e.g. INTEGRATE(1/X,X), the answer is given in terms
  804.      of LOG(ABS(...)) if LOGABS is TRUE, but in terms of LOG(...) if
  805.      LOGABS is FALSE.  For definite integration, the LOGABS:TRUE
  806.      setting is used, because here "evaluation" of the indefinite
  807.      integral at the endpoints is often needed.
  808.  
  809.  
  810.  - Variable: LOGARC
  811.      default: [FALSE] - if TRUE will cause the inverse circular and
  812.      hyperbolic functions to be converted into logarithmic form.
  813.      LOGARC(exp) will cause this conversion for a particular expression
  814.      without setting the switch or having to re-evaluate the expression
  815.      with EV.
  816.  
  817.  
  818.  - Variable: LOGCONCOEFFP
  819.      default:[FALSE] - controls which coefficients are contracted when
  820.      using LOGCONTRACT.  It may be set to the name of a predicate
  821.      function of one argument.  E.g. if you like to generate SQRTs, you
  822.      can do LOGCONCOEFFP:'LOGCONFUN$ LOGCONFUN(M):=FEATUREP(M,INTEGER)
  823.      OR RATNUMP(M)$ .  Then LOGCONTRACT(1/2*LOG(X)); will give
  824.      LOG(SQRT(X)).
  825.  
  826.  
  827.  - Function: LOGCONTRACT (exp)
  828.      recursively scans an exp, transforming subexpressions of the form
  829.      a1*LOG(b1) + a2*LOG(b2) + c into LOG(RATSIMP(b1^a1 * b2^a2)) + c
  830.           (C1) 2*(A*LOG(X) + 2*A*LOG(Y))$
  831.           (C2) LOGCONTRACT(%);
  832.                                                   2  4
  833.           (D3)                             A LOG(X  Y )
  834.      If you do DECLARE(N,INTEGER); then LOGCONTRACT(2*A*N*LOG(X)); gives
  835.      A*LOG(X^(2*N)).  The coefficients that "contract" in this manner
  836.      are those such as the 2 and the N here which satisfy
  837.      FEATUREP(coeff,INTEGER).  The user can control which coefficients
  838.      are contracted by setting the option LOGCONCOEFFP[FALSE] to the
  839.      name of a predicate function of one argument.  E.g. if you like to
  840.      generate SQRTs, you can do LOGCONCOEFFP:'LOGCONFUN$
  841.      LOGCONFUN(M):=FEATUREP(M,INTEGER) OR RATNUMP(M)$ .  Then
  842.      LOGCONTRACT(1/2*LOG(X)); will give LOG(SQRT(X)).
  843.  
  844.  
  845.  - Variable: LOGEXPAND
  846.      default: [TRUE] - causes LOG(A^B) to become B*LOG(A).  If it is
  847.      set to ALL, LOG(A*B) will also simplify to LOG(A)+LOG(B).  If it
  848.      is set to SUPER, then LOG(A/B) will also simplify to LOG(A)-LOG(B)
  849.      for rational numbers a/b, a#1.  (LOG(1/B), for B integer, always
  850.      simplifies.)  If it is set to FALSE, all of these simplifications
  851.      will be turned off.
  852.  
  853.  
  854.  - Variable: LOGNEGINT
  855.      default: [FALSE] - if TRUE implements the rule LOG(-n) ->
  856.      LOG(n)+%i*%pi   for n a positive integer.
  857.  
  858.  
  859.  - Variable: LOGNUMER
  860.      default: [FALSE] - if TRUE then negative floating point arguments
  861.      to LOG will always be converted to their absolute value before the
  862.      log is taken.  If NUMER is also TRUE, then negative integer
  863.      arguments to LOG will also be converted to their absolute value.
  864.  
  865.  
  866.  - Variable: LOGSIMP
  867.      default: [TRUE] - if FALSE then no simplification of %E to a power
  868.      containing LOG's is done.
  869.  
  870.  
  871.  - Function: PLOG (X)
  872.      the principal branch of the complex-valued natural logarithm with
  873.      -%PI < CARG(X) <= +%PI .
  874.  
  875.  
  876.  - Function: POLARFORM (exp)
  877.      returns R*%E^(%I*THETA) where R and THETA are purely real.
  878.  
  879.  
  880. 
  881. File: maxima.info,  Node: Trigonometric,  Next: Special Functions,  Prev: Logarithms,  Up: Top
  882.  
  883. Trigonometric
  884. *************
  885.  
  886. * Menu:
  887.  
  888. * Introduction to Trigonometric::
  889. * Definitions for Trigonometric::
  890.  
  891. 
  892. File: maxima.info,  Node: Introduction to Trigonometric,  Next: Definitions for Trigonometric,  Prev: Trigonometric,  Up: Trigonometric
  893.  
  894. Introduction to Trigonometric
  895. =============================
  896.  
  897.    - MACSYMA has many Trig functions defined.  Not all Trig identities
  898. are programmed, but it is possible for the user to add many of them
  899. using the pattern matching capabilities of the system.  The Trig
  900. functions defined in MACSYMA are: ACOS, ACOSH, ACOT, ACOTH, ACSC,
  901. ACSCH, ASEC, ASECH, ASIN, ASINH, ATAN, ATANH, COS, COSH, COT, COTH,
  902. CSC, CSCH, SEC, SECH, SIN, SINH, TAN, and TANH.  There are a number of
  903. commands especially for handling Trig functions, see TRIGEXPAND,
  904. TRIGREDUCE, and the switch TRIGSIGN.  Two SHARE packages extend the
  905. simplification rules built into MACSYMA, NTRIG and ATRIG1.  Do
  906. DESCRIBE(cmd) for details.
  907.  
  908. 
  909. File: maxima.info,  Node: Definitions for Trigonometric,  Prev: Introduction to Trigonometric,  Up: Trigonometric
  910.  
  911. Definitions for Trigonometric
  912. =============================
  913.  
  914.  - Function: ACOS
  915.      - Arc Cosine
  916.  
  917.  
  918.  - Function: ACOSH
  919.      - Hyperbolic Arc Cosine
  920.  
  921.  
  922.  - Function: ACOT
  923.      - Arc Cotangent
  924.  
  925.  
  926.  - Function: ACOTH
  927.      - Hyperbolic Arc Cotangent
  928.  
  929.  
  930.  - Function: ACSC
  931.      - Arc Cosecant
  932.  
  933.  
  934.  - Function: ACSCH
  935.      - Hyperbolic Arc Cosecant
  936.  
  937.  
  938.  - Function: ASEC
  939.      - Arc Secant
  940.  
  941.  
  942.  - Function: ASECH
  943.      - Hyperbolic Arc Secant
  944.  
  945.  
  946.  - Function: ASIN
  947.      - Arc Sine
  948.  
  949.  
  950.  - Function: ASINH
  951.      - Hyperbolic Arc Sine
  952.  
  953.  
  954.  - Function: ATAN
  955.      - Arc Tangent
  956.  
  957.  
  958.  - Function: ATAN2 (Y,X)
  959.      yields the value of ATAN(Y/X) in the interval -%PI to %PI.
  960.  
  961.  
  962.  - Function: ATANH
  963.      - Hyperbolic Arc Tangent
  964.  
  965.  
  966.  - Function: ATRIG1
  967.      - SHARE1;ATRIG1 FASL contains several additional simplification
  968.      rules for inverse trig functions.  Together with rules already
  969.      known to Macsyma, the following angles are fully implemented: 0,
  970.      %PI/6, %PI/4, %PI/3, and %PI/2.  Corresponding angles in the other
  971.      three quadrants are also available.  Do LOAD(ATRIG1); to use them.
  972.  
  973.  
  974.  - Function: COS
  975.      - Cosine
  976.  
  977.  
  978.  - Function: COSH
  979.      - Hyperbolic Cosine
  980.  
  981.  
  982.  - Function: COT
  983.      - Cotangent
  984.  
  985.  
  986.  - Function: COTH
  987.      - Hyperbolic Cotangent
  988.  
  989.  
  990.  - Function: CSC
  991.      - Cosecant
  992.  
  993.  
  994.  - Function: CSCH
  995.      - Hyperbolic Cosecant
  996.  
  997.  
  998.  - Variable: HALFANGLES
  999.      default: [FALSE] - if TRUE causes half-angles to be simplified
  1000.      away.
  1001.  
  1002.  
  1003.  - Function: SEC
  1004.      - Secant
  1005.  
  1006.  
  1007.  - Function: SECH
  1008.      - Hyperbolic Secant
  1009.  
  1010.  
  1011.  - Function: SIN
  1012.      - Sine
  1013.  
  1014.  
  1015.  - Function: SINH
  1016.      - Hyperbolic Sine
  1017.  
  1018.  
  1019.  - Function: TAN
  1020.      - Tangent
  1021.  
  1022.  
  1023.  - Function: TANH
  1024.      - Hyperbolic Tangent
  1025.  
  1026.  
  1027.  - Function: TRIGEXPAND (exp)
  1028.      expands trigonometric and hyperbolic functions of sums of angles
  1029.      and of multiple angles occurring in exp.  For best results, exp
  1030.      should be expanded.  To enhance user control of simplification,
  1031.      this function expands only one level at a time, expanding sums of
  1032.      angles or multiple angles.  To obtain full expansion into sines
  1033.      and cosines immediately, set the switch TRIGEXPAND:TRUE.
  1034.      TRIGEXPAND default: [FALSE] - if TRUE causes expansion of all
  1035.      expressions containing SINs and COSs occurring subsequently.
  1036.      HALFANGLES[FALSE] - if TRUE causes half-angles to be simplified
  1037.      away.  TRIGEXPANDPLUS[TRUE] - controls the "sum" rule for
  1038.      TRIGEXPAND, expansion of sums (e.g. SIN(X+Y)) will take place only
  1039.      if TRIGEXPANDPLUS is TRUE.  TRIGEXPANDTIMES[TRUE] - controls the
  1040.      "product" rule for TRIGEXPAND, expansion of products (e.g.
  1041.      SIN(2*X)) will take place only if TRIGEXPANDTIMES is TRUE.
  1042.           (C1) X+SIN(3*X)/SIN(X),TRIGEXPAND=TRUE,EXPAND;
  1043.                                         2           2
  1044.           (D1)                     - SIN (X) + 3 COS (X) + X
  1045.           (C2) TRIGEXPAND(SIN(10*X+Y));
  1046.           (D2)               COS(10 X) SIN(Y) + SIN(10 X) COS(Y)
  1047.  
  1048.  - Variable: TRIGEXPANDPLUS
  1049.      default: [TRUE] - controls the "sum" rule for TRIGEXPAND.  Thus,
  1050.      when the TRIGEXPAND command is used or the TRIGEXPAND switch set
  1051.      to TRUE, expansion of sums (e.g. SIN(X+Y)) will take place only if
  1052.      TRIGEXPANDPLUS is TRUE.
  1053.  
  1054.  
  1055.  - Variable: TRIGEXPANDTIMES
  1056.      default: [TRUE] - controls the "product" rule for TRIGEXPAND.
  1057.      Thus, when the TRIGEXPAND command is used or the TRIGEXPAND switch
  1058.      set to TRUE, expansion of products (e.g. SIN(2*X)) will take place
  1059.      only if TRIGEXPANDTIMES is TRUE.
  1060.  
  1061.  
  1062.  - Variable: TRIGINVERSES
  1063.      default: [ALL] - controls the simplification of the composition of
  1064.      trig and hyperbolic functions with their inverse functions: If
  1065.      ALL, both e.g. ATAN(TAN(X)) and TAN(ATAN(X)) simplify to X.  If
  1066.      TRUE, the arcfunction(function(x)) simplification is turned off.
  1067.      If FALSE, both the arcfun(fun(x)) and fun(arcfun(x))
  1068.      simplifications are turned off.
  1069.  
  1070.  
  1071.  - Function: TRIGREDUCE (exp, var)
  1072.      combines products and powers of trigonometric and hyperbolic SINs
  1073.      and COSs of var into those of multiples of var.  It also tries to
  1074.      eliminate these functions when they occur in denominators.  If var
  1075.      is omitted then all variables in exp are used.  Also see the
  1076.      POISSIMP function (6.6).
  1077.           (C4) TRIGREDUCE(-SIN(X)^2+3*COS(X)^2+X);
  1078.           (D4)                        2 COS(2 X) + X + 1
  1079.           The trigonometric simplification routines will use declared
  1080.           information in some simple cases.  Declarations about variables are
  1081.           used as follows, e.g.
  1082.           (C5) DECLARE(J, INTEGER, E, EVEN, O, ODD)$
  1083.           (C6) SIN(X + (E + 1/2)*%PI)$
  1084.           (D6)                      COS(X)
  1085.           (C7) SIN(X + (O + 1/2) %PI);
  1086.           (D7)                     - COS(X)
  1087.  
  1088.  - Variable: TRIGSIGN
  1089.      default: [TRUE] - if TRUE permits simplification of negative
  1090.      arguments to trigonometric functions. E.g., SIN(-X) will become
  1091.      -SIN(X) only if TRIGSIGN is TRUE.
  1092.  
  1093.  
  1094.  - Function: TRIGSIMP (expr)
  1095.      employs the identities sin(x)^2 + cos(x)^2 = 1 and cosh(x)^2 -
  1096.      sinh(x)^2 = 1 to simplify expressions containing tan, sec, etc. to
  1097.      sin, cos, sinh, cosh so that further simplification may be
  1098.      obtained by using TRIGREDUCE on the result.  Some examples may be
  1099.      seen by doing DEMO("trgsmp.dem"); .  See also the TRIGSUM function.
  1100.  
  1101.  
  1102.  - Function: TRIGRAT (trigexp)
  1103.      gives a canonical simplifyed quasilinear form of a trigonometrical
  1104.      expression; trigexp is a rational fraction of several sin, cos or
  1105.      tan, the arguments of them are linear forms in some variables (or
  1106.      kernels) and %pi/n (n integer) with integer coefficients. The
  1107.      result is a simplifyed fraction with numerator and denominator
  1108.      linear in sin and cos.  Thus TRIGRAT linearize always when it is
  1109.      possible.(written by D. Lazard).
  1110.  
  1111.           (c1) trigrat(sin(3*a)/sin(a+%pi/3));
  1112.           
  1113.           (d1)                 sqrt(3) sin(2 a) + cos(2 a) - 1
  1114.  
  1115.      Here is another example (for which the function was intended); see
  1116.      [Davenport, Siret, Tournier, Calcul Formel, Masson (or in english,
  1117.      Addison-Wesley), section 1.5.5, Morley theorem). Timings are on
  1118.      VAX 780.
  1119.  
  1120.           (c4)   c:%pi/3-a-b;
  1121.           
  1122.                                  %pi
  1123.           (d4)                  - b - a + ---
  1124.                                   3
  1125.           
  1126.           (c5)   bc:sin(a)*sin(3*c)/sin(a+b);
  1127.           
  1128.                            sin(a) sin(3 b + 3 a)
  1129.           (d5)                  ---------------------
  1130.                             sin(b + a)
  1131.           
  1132.           (c6)   ba:bc,c=a,a=c$
  1133.           
  1134.           (c7)   ac2:ba^2+bc^2-2*bc*ba*cos(b);
  1135.           
  1136.               2       2
  1137.                sin (a) sin (3 b + 3 a)
  1138.           (d7) -----------------------
  1139.                     2
  1140.                  sin (b + a)
  1141.           
  1142.                               %pi
  1143.              2 sin(a) sin(3 a) cos(b) sin(b + a - ---) sin(3 b + 3 a)
  1144.                                3
  1145.            - --------------------------------------------------------
  1146.                          %pi
  1147.                      sin(a - ---) sin(b + a)
  1148.                           3
  1149.           
  1150.                 2            2      %pi
  1151.              sin (3 a) sin (b + a - ---)
  1152.                          3
  1153.            + ---------------------------
  1154.                    2       %pi
  1155.                 sin (a - ---)
  1156.                       3
  1157.           
  1158.           (c9)   trigrat(ac2);
  1159.           Totaltime= 65866 msec.  GCtime= 7716 msec.
  1160.           
  1161.           (d9)
  1162.           - (sqrt(3) sin(4 b + 4 a) - cos(4 b + 4 a)
  1163.           
  1164.           - 2 sqrt(3) sin(4 b + 2 a)
  1165.           
  1166.           + 2 cos(4 b + 2 a) - 2 sqrt(3) sin(2 b + 4 a) + 2 cos(2 b + 4 a)
  1167.           
  1168.           + 4 sqrt(3) sin(2 b + 2 a) - 8 cos(2 b + 2 a) - 4 cos(2 b - 2 a)
  1169.           
  1170.           + sqrt(3) sin(4 b) - cos(4 b) - 2 sqrt(3) sin(2 b) + 10 cos(2 b)
  1171.           
  1172.           + sqrt(3) sin(4 a) - cos(4 a) - 2 sqrt(3) sin(2 a) + 10 cos(2 a)
  1173.           
  1174.              - 9)/4
  1175.  
  1176. 
  1177. File: maxima.info,  Node: Special Functions,  Next: Orthogonal Polynomials,  Prev: Trigonometric,  Up: Top
  1178.  
  1179. Special Functions
  1180. *****************
  1181.  
  1182. * Menu:
  1183.  
  1184. * Introduction to Special Functions::
  1185. * GAMALG::
  1186. * SPECINT::
  1187. * Definitions for Special Functions::
  1188.  
  1189. 
  1190. File: maxima.info,  Node: Introduction to Special Functions,  Next: GAMALG,  Prev: Special Functions,  Up: Special Functions
  1191.  
  1192. Introduction to Special Functions
  1193. =================================
  1194.  
  1195.  - %J:
  1196.      [index](expr) - Bessel Funct 1st Kind (in SPECINT)
  1197.  
  1198.  
  1199.  - %K: [index](expr)
  1200.      Bessel Funct 2nd Kind (in SPECINT)
  1201.  
  1202.      Constant, in ODE2
  1203.  
  1204.  
  1205. 
  1206. File: maxima.info,  Node: GAMALG,  Next: SPECINT,  Prev: Introduction to Special Functions,  Up: Special Functions
  1207.  
  1208. GAMALG
  1209. ======
  1210.  
  1211.    - A Dirac gamma matrix algebra program which takes traces of and
  1212. does manipulations on gamma matrices in n dimensions.  It may be loaded
  1213. into MACSYMA by LOADFILE("gam"); A preliminary manual is contained in
  1214. the file SHARE;GAM USAGE and may be printed using
  1215. PRINTFILE(GAM,USAGE,SHARE);
  1216.  
  1217.